contiguous and non-contiguous memory management